<nav class="col-md-2 d-none d-md-block bg-light sidebar" id="sidebar" th:fragment="sidebar">
    <div class="sidebar-sticky" th:if="${sidebarType == 'user'}">
        <ul class="nav flex-column">
            <li class="nav-item">
                <a class="nav-link" href="/user/info.html">
                    <i class="bi bi-gear"></i>
                    信息修改
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link active" href="/emps-plus">
                    <i class="bi bi-cart-check-fill"></i>
                    购物车
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">
                    <i class="bi bi-card-list"></i>
                    订单管理
                </a>
            </li>
        </ul>

        <ul class="nav flex-column mb-2">
        </ul>
    </div>

    <div class="sidebar-sticky" th:if="${sidebarType == 'admin'}">
        <div class="accordion accordion-flush" id="accordionFlushExample">
            <div class="accordion-item">
                <h2 class="accordion-header" id="h-option-user">
                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#div-option-user" aria-expanded="false" aria-controls="div-option-user">
                        用户管理
                    </button>
                </h2>
                <div id="div-option-user" class="accorhion-collapse collapse" aria-labelledby="h-option-user" data-bs-parent="#accordionFlushExample">
                    <div class="accordion-body">
                        <div class="list-group">
                            <a th:href="@{/admin/user.html}" class="list-group-item list-group-item-action active">用户信息管理</a>
                            <a th:href="@{/admin/role.html}" class="list-group-item list-group-item-action">用户角色管理</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="accordion-item">
                <h2 class="accordion-header" id="h-option-provider">
                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#div-option-provider" aria-expanded="false" aria-controls="div-option-provider">
                        供应商管理
                    </button>
                </h2>
                <div id="div-option-provider" class="accordion-collapse collapse" aria-labelledby="h-option-provider" data-bs-parent="#accordionFlushExample">
                    <div class="accordion-body">
                        <div class="list-group">
                            <a th:href="@{/admin/provider.html}" class="list-group-item list-group-item-action">供应商信息管理</a>
                            <a href="#" class="list-group-item list-group-item-action">供应商信息统计</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="accordion-item">
                <h2 class="accordion-header" id="h-option-product">
                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#div-option-product" aria-expanded="false" aria-controls="div-option-product">
                        商品管理
                    </button>
                </h2>
                <div id="div-option-product" class="accordion-collapse collapse" aria-labelledby="h-option-product" data-bs-parent="#accordionFlushExample">
                    <div class="accordion-body">
                        <div class="list-group">
                            <a th:href="@{/admin/product.html}" class="list-group-item list-group-item-action active">商品信息管理</a>
                            <a href="#" class="list-group-item list-group-item-action">商品信息统计</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="accordion-item">
                <h2 class="accordion-header" id="h-option-permission">
                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#div-option-permission" aria-expanded="false" aria-controls="h-option-permission">
                        权限管理
                    </button>
                </h2>
                <div id="div-option-permission" class="accordion-collapse collapse" aria-labelledby="h-option-permission" data-bs-parent="#accordionFlushExample">
                    <div class="accordion-body">
                        <div class="list-group">
                            <a th:href="@{/admin/roleperm.html}" class="list-group-item list-group-item-action" aria-current="true">
                                角色权限管理
                            </a>
                            <a th:href="@{/admin/perm.html}" class="list-group-item list-group-item-action">权限中心</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</nav>